#include<bits/stdc++.h>

using namespace std;

int main() {
    string s, k("to");
    getline(cin, s);//cin>>s;



    //cout<<count(s.begin(),s.end(),'0');

    int p = 0, cnt = 0;
    while ((p = s.find(k, p)) != string::npos) {
        ++cnt;
        p += k.size();

    }
    cout << cnt;
    return 0;
}
